package b_state.b_design_patten;

/**
 * Created by wug on 2016/6/14 0014.
 */
public class MainTest {
    public static void main(String[] args) {
        WaterMachine waterMachine = new WaterMachine();
        waterMachine.put();

        waterMachine.insert(1);
        waterMachine.sell();
        waterMachine.insert(5);
        waterMachine.sell();
        waterMachine.retun();
        waterMachine.retun();

        waterMachine.insert(100);
        for (int i = 0; i < 11; i++) {
            waterMachine.sell();
        }

        waterMachine.retun();


        waterMachine.put();
        waterMachine.insert(100);
        for (int i=0; i<12; i++) {
            waterMachine.sell();
        }
        waterMachine.retun();



    }
}
